package Xiancheng;

import java.lang.Thread.State;

public class ThreadMain
{
	public static void main(String[] args)
	{
		System.out.println("main开始执行");
		System.out.println("======");
		MyRunnable myRunnable = new MyRunnable();
		for(int i = 0 ; i < 5; i++) 
		{
			Thread test = new Thread(myRunnable);
			test.start();
		}
		Thread currThread = Thread.currentThread() ;
		MyThread myThread = new MyThread();
		State state = currThread.getState();
		System.out.println(state);
		for (int i = 0 ; i < 5 ; i++) 
		{
			Thread test1 = new Thread(myThread);
			test1.start();

		}
		System.out.println("main结束执行");
		int a = Thread.activeCount();
		
		System.out.println(a);
	}
}
